﻿
using DongFangGuoKai.WMSPlatform.Domain.Model;
using DongFangGuoKai.WMSPlatform.Service.InboundOrderDetail.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongFangGuoKai.WMSPlatform.Service.InboundOrderDetail
{
    public interface ITReceivingOrderDetailService
    {
        /// <summary>
        /// 查询验收单
        /// </summary>
        /// <param name="supplierId"></param>
        /// <param name="status"></param>
        /// <param name="warehouseId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<GetInOrderDTO> GetReceivingBillList(string? billNo, int status, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 显示入库单
        /// </summary>
        /// <param name="billType"></param>
        /// <param name="status"></param>
        /// <param name="warehouseid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TReceivingOrderDetails> GetReceivingOrderDetailList(string orderSn, int billType, int status, int warehouseid, int pageIndex, int pageSize, out int totalCount);


        /// <summary>
        /// PDA查询验收单
        /// </summary>
        /// <param name="supplierId"></param>
        /// <param name="status"></param>
        /// <param name="warehouseId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<GetInOrderDTO> PDAGetReceivingBillList(string? key, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 修改收货单状态
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        bool UpdReceivingBillStatus(int rid);

        /// <summary>
        /// RFID添加收货单
        /// </summary>
        /// <param name="addReceivingBilDTO"></param>
        /// <returns></returns>
        bool AddCheck(AddReceivingBilDTO addReceivingBilDTO, out string Message);

        /// <summary>
        /// 获取提交入库的数据
        /// </summary>
        /// <returns></returns>
        List<SubmitPutAwayDTO>? GetSubmitOutList();

        /// <summary>
        /// 返回验收单下所有物料样品
        /// </summary>
        /// <param name="ChackNumber"></param>
        /// <returns></returns>
        GetInOrderDTO? GetCheckMaterialCode(string ChackNumber);

        /// <summary>
        /// PDA组垛
        /// </summary>
        /// <param name="m"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool BuildCreateStackingStorageMaterials(ReceivingBillOrderMaterialsDto m, out string message);

        /// <summary>
        /// 入库(多个物料的) （海宁的）
        /// </summary>
        /// <param name="Palletlist">托盘码</param>
        /// <returns></returns>
        bool ExecCreateMaterials(string PalletCode, out string errMsg);

        /// <summary>
        /// 开始入库（多个物料的）
        /// </summary>
        /// <param name="errorMsg"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        bool ExecCreateMaterialsInstruct(out string errorMsg, params object[] data);

        /// <summary>
        /// 修改收货单状态（已提交 海宁）
        /// </summary>
        /// <param name="checkNumber"></param>
        /// <param name="orderIds"></param>
        /// <returns></returns>
        bool UpdateReceivingBillStatus(string checkNumber, string orderIds, out string Msg);
    }
}
